package com.feng;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @description:
 * @author: lrf
 * @create: 2019-09-07
 **/
public class Main {

    public static void main(String[] args) {

        AnnotationConfigApplicationContext context
                = new AnnotationConfigApplicationContext(TaskExecutorConfig.class);

        AsyncTaskService asyncTaskService = context.getBean(AsyncTaskService.class);

        for (int i = 0; i < 10; i++) {
            asyncTaskService.executorTask(i);
            asyncTaskService.executorAsyncTaskPlus(i);
        }

        System.exit(0);

        context.close();

    }
}
